**audience cost wave 3

gen disq1 = 0
replace disq1 = 1 if q3 == 2

gen appq1 = 0
replace appq1 = 1 if q3 == 1

gen neuq1 = 0
replace neuq1 = 1 if q3 ==3

gen q1random = q2
gen q1control = 0 
replace q1control = 1 if q2 == 1


**contextual

gen regime=0
replace regime=1 if q1>=9

gen goal=0
replace goal=1 if q1==1
replace goal=1 if q1==2
replace goal=1 if q1==3
replace goal=1 if q1==4
replace goal=1 if q1==9
replace goal=1 if q1==10
replace goal=1 if q1==11
replace goal=1 if q1==12

gen cost=0
replace cost=1 if q1==1
replace cost=1 if q1==2
replace cost=1 if q1==5
replace cost=1 if q1==6
replace cost=1 if q1==9
replace cost=1 if q1==10
replace cost=1 if q1==13
replace cost=1 if q1==14

gen interest=0
replace interest=1 if q1==1
replace interest=1 if q1==3
replace interest=1 if q1==5
replace interest=1 if q1==7
replace interest=1 if q1==9
replace interest=1 if q1==11
replace interest=1 if q1==13
replace interest=1 if q1==15


**social demographic variables

gen age=q23
label variable age "Age"

gen male=q22
replace male=0 if male==2
label variable  male "Male"

gen edu=q25
gen college=0
replace college=1 if edu>6
gen ccp=0
replace ccp=1 if q28==2
label variable ccp "CCP Member"

gen income=q29
replace income=. if q29>7
label variable income "Income"

gen socialstatus=q30
label variable socialstatus "Social Status"

gen news=q31
label variable news "Interest in International Affairs"

gen international = 0
replace international = 1 if news < 3

gen age30=0
replace age30=1 if age>30


****Figure 3: Plotting the differences between control and treatment scenarios and the backtracking scenarios pooled together:

**empty promise

ttest disq1 if inlist(q1random, 1, 2), by(q1control)
matrix mat1=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest neuq1 if inlist(q1random, 1, 2), by(q1control)
matrix mat2=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest appq1 if inlist(q1random, 1, 2), by(q1control)
matrix mat3=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100



***deployed

ttest disq1 if inlist(q1random, 1, 3), by(q1control)
matrix mat4=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest neuq1 if inlist(q1random, 1, 3), by(q1control)
matrix mat5=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest appq1 if inlist(q1random, 1, 3), by(q1control)
matrix mat6=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100


**deployed but withdraw

ttest disq1 if inlist(q1random, 1, 4), by(q1control)
matrix mat7=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest neuq1 if inlist(q1random, 1, 4), by(q1control)
matrix mat8=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest appq1 if inlist(q1random, 1, 4), by(q1control)
matrix mat9=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

**backtracking (empty promise and deployed but withdraw combined)

ttest disq1 if inlist(q1random, 1, 2, 4), by(q1control)
matrix mat10=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest neuq1 if inlist(q1random, 1, 2, 4), by(q1control)
matrix mat11=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

ttest appq1 if inlist(q1random, 1, 2, 4), by(q1control)
matrix mat12=(r(mu_1)-r(mu_2), r(mu_1)-r(mu_2)-1.96*r(se), r(mu_1)-r(mu_2)+1.96*r(se))*100

**

matrix s1 = mat4\mat1\mat7\mat10
matrix rownames s1 = b a c d

matrix s2 = mat5\mat2\mat8\mat11
matrix rownames s2 = b a c d

matrix s3 = mat6\mat3\mat9\mat12
matrix rownames s3 = b a c d


**

coefplot (matrix(s1[.,1]), ci("s1[.,2] s1[.,3]") label(Disapproval) ms(Oh)) ///
 (matrix(s2[.,1]), ci("s2[.,2] s2[.,3]") label(Neutral) ms(Dh))  ///
 (matrix(s3[.,1]), ci("s3[.,2] s3[.,3]") label(Approval) ms(Th)),  ///
 coeflabel(a = "Empty Promise"  b = "Deployed " c = "Deployed but Withdrew" d = "Backtracking") ///
mlabel format(%9.2g) mlabposition(1) xline(0, lp(dash)) graphregion(color(white)) ///
ciopts(recast(rcap)) legend(row(1) pos(6))

**Qualitative: open-ended questions

**reason for disapproval in the backing down scenarios:

tab reason_for_disapproval if disq1==1 & (q1random == 2 | q1random ==4)

*reason_for_disapp |
*            roval |      Freq.     Percent        Cum.
*------------------+-----------------------------------
*       reputation |        158       61.72       61.72
*right thing to do |         31       12.11       73.83
*     instrumental |         49       19.14       92.97
*           others |         18        7.03      100.00
*------------------+-----------------------------------
*            Total |        256      100.00
 
**reason for disapproval in the control scenarios:

tab reason_for_disapproval if disq1==1 & q1control==1

*reason_for_disapp |
*            roval |      Freq.     Percent        Cum.
*------------------+-----------------------------------
*       reputation |          3        3.53        3.53
*right thing to do |         49       57.65       61.18
*     instrumental |         24       28.24       89.41
*           others |          9       10.59      100.00
*------------------+-----------------------------------
*            Total |         85      100.00


**how important are international reputation?

tab reputation

*                             reputation |      Freq.     Percent        Cum.
*----------------------------------------+-----------------------------------
*              reputation very important |      1,573       77.99       77.99
*               depends on the situation |        344       17.06       95.04
*national interest trumps everything els |        100        4.96      100.00
*----------------------------------------+-----------------------------------
*                                  Total |      2,017      100.00


** what to do if unhappy with state's foreign policy?

*Figure 4 & 5

tab action

*                  action |      Freq.     Percent        Cum.
*-------------------------+-----------------------------------
*        state doing fine |        303       14.69       14.69
*    discuss with friends |        295       14.30       28.99
*complain on social media |        357       17.30       46.29
*  complain to government |        236       11.44       57.73
*                 protest |         46        2.23       59.96
*              do nothing |        826       40.04      100.00
*-------------------------+-----------------------------------
*                   Total |      2,063      100.00

tab action if disq1 == 1


*                  action |      Freq.     Percent        Cum.
*-------------------------+-----------------------------------
*        state doing fine |         29        6.79        6.79
*    discuss with friends |         71       16.63       23.42
*complain on social media |         99       23.19       46.60
*  complain to government |         59       13.82       60.42
*                 protest |         16        3.75       64.17
*              do nothing |        153       35.83      100.00
*-------------------------+-----------------------------------
*                   Total |        427      100.00

**table 1

gen group = 1
replace group = 2 if college == 1 & ccp == 0 
replace group = 3 if college == 0 & ccp == 1 
replace group = 4 if college == 1 & ccp == 1 

tab action group, col



**Appendix A3

**Table A3

sum age age30 edu college male ccp international income socialstatus

**Appendix B

**Table B3

tab q1random, gen(scenario)

logit scenario1 age edu male ccp international income socialstatus regime goal cost interest
logit scenario2 age edu male ccp international income socialstatus regime goal cost interest
logit scenario3 age edu male ccp international income socialstatus regime goal cost interest
logit scenario4 age edu male ccp international income socialstatus regime goal cost interest

**Appendix C Table C3

gen rating=1 if q4 == 1
replace rating=2 if q4 == 2
replace rating=3 if q6 == 1
replace rating=4 if q6 == 3
replace rating=5 if q6 == 2
replace rating=6 if q5 == 2
replace rating=7 if q5 == 1

reg rating scenario2-scenario4 
outreg2 using wave3, excel replace 

reg rating scenario2-scenario4 regime goal cost interest 
outreg2 using wave3, excel append 

reg rating scenario2-scenario4 regime goal cost interest age edu male ccp international income socialstatus 
outreg2 using wave3, excel append 
